  GNU nano 4.8                                                                                       Install.sh                                                                                        Modified
##!/bin/bash
echo "You are about to Download/Install the required items for the HP ILO Fan control, "
echo "Do you accept that your are about to install? [yes] or [no] :"
read input
if [ $input = yes ] ; then
# agreement confirmed
# refresh OR create agreement file status
        ##for ubuntu
        #echo "Installing required apt packages sshpass, lm-sensors and wget"
        #apt install sshpass wget lm-sensors jq -y

        #for clearlinux
        echo "Installing required packages sshpass, lm-sensors"
        swupd bundle-add ansible lm-sensors jq

        echo "Installed required apt packages"

        echo "copying ILO_250 for ROM Upgrade"
        echo "copying to / directory"
        cp ./Files/ilo_250 /
        echo "Finished move"
        echo "copying autofan.service to /etc/systemd/system/"
        cp  ./Files/autofan.service /etc/systemd/system/
        echo "Finished copying autofan.service"

        echo "Which server are you running? Dl360p 1u (1) DL380p 2u (2) sl230s 4u (3) [1] , [2] or [3]:"
                read server
                if [ $server = 1 ] ; then
                        echo "Preping autofan.sh for DL360p "
                        cd /
                        echo "Downloading Latest autofan.sh"
                        wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan.sh
                        echo "Downloaded autofan.sh Change Placeholders with correct info"
                        echo "Please Visit the Github Page to Follow Instructions"
                        echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control"
                        exit 1
                elif [ $server = 2 ] ; then
                        echo "Preping autofan.sh for DL380p "
                        cd /
                        echo "Downloading Latest autofan.sh"
                        wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan-dl380p-g8.sh
                        echo "Renaming File"
                        mv autofan-dl380p-g8.sh autofan.sh
                        echo "Downloaded autofan.sh Change Placeholders with correct info"
                        echo "Please Visit the Github Page to Follow Instructions"
                        echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control"
                        exit 1
                elif [ $server = 3 ] ; then
                        echo "Preping autofan-sl230s-g8.sh for sl230s "
                        echo "copying Latest autofan-sl230s-g8.sh to /"
                        cp ./Files/autofan-sl230s-g8.sh /autofan.sh
                        exit 1
                fi
else
   echo " :( exitting"
   exit 1
fi
